package com.leinao.constant;

/**
 * @Description 项目任务项目枚举
 * @Author guoliangbo
 * @Date 2019/5/7 10:28
 * @Version 1.0
 */
public enum ProjectJobHandleEnum {

    GET_SUCCESS(0, "获取任务明细成功"),

    GET_ERROR(-2, "获取任务明细失败"),

    LOAD_JOB_INFO_ERROR(-3, "获取底层任务明细失败"),

    STOP_SUCCESS(0, "停止任务成功"),

    STOP_ERROR(-2, "停止任务失败"),

    CREATE_JOB_SAFE_CONTROL(-7,"同一项目5秒内只能创建一个调试任务"),

    CREATE_JOB_ARGS_ERROR(-3,"运行任务参数格式有误"),

    USERS_ARE_UNDERPOWERED(-15,"用户算力低于0，不能提交任务！"),

    RUN_ERROR(-2, "运行任务失败"),

    URL_ERROR(-5, "访问地址有误"),

    JUPYTER_SUCCESS(0, "获取jupyterUrl成功"),

    JUPYTER_NO_RUN_ERROR(-3, "暂无需要运行的调试任务"),

    JUPYTER_JOB_INFO_ERROR(-5, "无法获取任务状态信息"),

    JUPYTER_GET_URL_ERROR(-4, "无法获取调试任务的jupyterUrl"),
    
    JOB_TYPE(2, "调试任务"),
    
    JOB_UNAUTHORIZED(-4, "请求要求用户的身份认证"),
    
    HTTP_SERVER_EXCEPTION(-6, "服务异常"),
    
    JOB_TYPE_VIEW(1, "查看任务"),

    NOT_JOB_OWNER(-10, "no power，not job owner！"),

    JOB_REMARK_TOO_LENGTH(-11, "job remark too length！"),

    UPDATE_SUCCESS(0, "update job info success!"),

    UPDATE_FAILED(-1, "update job info failed!"),

    NO_JOB(-2, "暂无调试任务"),

    JOBTAG_TOO_LONG(-12,"任务标签过长"),

    GET_JOB_ENVIRONMENT_ERROR(-13,"获取任务语言框架失败"),

    PUBLIC_JOB_IS_NOT_EXIST(-14,"任务不存在"),

    //tensorboard启动失败
    //无法获取输出目录
    //启动成功
    //请重新尝试
    TENSORBOARD_START_FAIL(-2,"tensorboard启动失败"),
    NOT_FIND_OUTPUTS_PATH(-3,"无法获取输出目录"),
    STARTUP_SUCCESS(0,"启动成功"),
    TRY_AGAIN(-2,"请重新尝试");

    private Integer seq;

    private String desc;

    ProjectJobHandleEnum(Integer seq, String desc) {
        this.seq = seq;
        this.desc = desc;
    }

    public Integer getSeq() {
        return seq;
    }

    public String getDesc() {
        return desc;
    }

}
